package observerPattern;

/**
 * Created by JiaJia on 2019/6/16 0016.
 */
public class Client {
    public static void main(String[] args) {
        AllyController acc=new ConcreteAllyControlCenter("金庸群侠");
        Observer player1=new Player("杨过");
        acc.join(player1);
        Observer player2=new Player("令狐冲");
        acc.join(player2);
        Observer player3=new Player("张无忌");
        acc.join(player3);
        Observer player4=new Player("段誉");
        acc.join(player4);

        player1.beAttacked(acc);
    }
}